package com.ruoyi.domain;

import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 仓库#repository_info#说明 : 存放商品的场地
 * @TableName repository_info
 */
public class RepositoryInfo extends BaseEntity implements Serializable {
    /**
     * 仓库主键#primary
     */
    private Integer repositoryId;

    /**
     * 仓库名称
     */
    private String repositoryName;

    /**
     * 仓库代号
     */
    private String repositoryCode;

    /**
     * 联系电话
     */
    private String repositoryPhone;

    /**
     * 仓库状态#state#0=停用, 1=可用
     */
    private Integer repositoryState;

    /**
     * 仓库地址
     */
    private String repositoryAddress;

    /**
     * 启动时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date repositoryStartDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date repositoryStartDateFrom;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date repositoryStartDateTo;

    private static final long serialVersionUID = 1L;

    @Override
    public String toString() {
        return "RepositoryInfo{" +
                "repositoryId=" + repositoryId +
                ", repositoryName='" + repositoryName + '\'' +
                ", repositoryCode='" + repositoryCode + '\'' +
                ", repositoryPhone='" + repositoryPhone + '\'' +
                ", repositoryState=" + repositoryState +
                ", repositoryAddress='" + repositoryAddress + '\'' +
                ", repositoryStartDate=" + repositoryStartDate +
                ", repositoryStartDateFrom=" + repositoryStartDateFrom +
                ", repositoryStartDateTo=" + repositoryStartDateTo +
                '}';
    }

    public Date getRepositoryStartDateFrom() {
        return repositoryStartDateFrom;
    }

    public void setRepositoryStartDateFrom(Date repositoryStartDateFrom) {
        this.repositoryStartDateFrom = repositoryStartDateFrom;
    }

    public Date getRepositoryStartDateTo() {
        return repositoryStartDateTo;
    }

    public void setRepositoryStartDateTo(Date repositoryStartDateTo) {
        this.repositoryStartDateTo = repositoryStartDateTo;
    }

    /**
     * 仓库主键#primary
     */
    public Integer getRepositoryId() {
        return repositoryId;
    }

    /**
     * 仓库主键#primary
     */
    public void setRepositoryId(Integer repositoryId) {
        this.repositoryId = repositoryId;
    }

    /**
     * 仓库名称
     */
    public String getRepositoryName() {
        return repositoryName;
    }

    /**
     * 仓库名称
     */
    public void setRepositoryName(String repositoryName) {
        this.repositoryName = repositoryName;
    }

    /**
     * 仓库代号
     */
    public String getRepositoryCode() {
        return repositoryCode;
    }

    /**
     * 仓库代号
     */
    public void setRepositoryCode(String repositoryCode) {
        this.repositoryCode = repositoryCode;
    }

    /**
     * 联系电话
     */
    public String getRepositoryPhone() {
        return repositoryPhone;
    }

    /**
     * 联系电话
     */
    public void setRepositoryPhone(String repositoryPhone) {
        this.repositoryPhone = repositoryPhone;
    }

    /**
     * 仓库状态#state#0=停用, 1=可用
     */
    public Integer getRepositoryState() {
        return repositoryState;
    }

    /**
     * 仓库状态#state#0=停用, 1=可用
     */
    public void setRepositoryState(Integer repositoryState) {
        this.repositoryState = repositoryState;
    }

    /**
     * 仓库地址
     */
    public String getRepositoryAddress() {
        return repositoryAddress;
    }

    /**
     * 仓库地址
     */
    public void setRepositoryAddress(String repositoryAddress) {
        this.repositoryAddress = repositoryAddress;
    }

    /**
     * 启动时间
     */
    public Date getRepositoryStartDate() {
        return repositoryStartDate;
    }

    /**
     * 启动时间
     */
    public void setRepositoryStartDate(Date repositoryStartDate) {
        this.repositoryStartDate = repositoryStartDate;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RepositoryInfo other = (RepositoryInfo) that;
        return (this.getRepositoryId() == null ? other.getRepositoryId() == null : this.getRepositoryId().equals(other.getRepositoryId()))
            && (this.getRepositoryName() == null ? other.getRepositoryName() == null : this.getRepositoryName().equals(other.getRepositoryName()))
            && (this.getRepositoryCode() == null ? other.getRepositoryCode() == null : this.getRepositoryCode().equals(other.getRepositoryCode()))
            && (this.getRepositoryPhone() == null ? other.getRepositoryPhone() == null : this.getRepositoryPhone().equals(other.getRepositoryPhone()))
            && (this.getRepositoryState() == null ? other.getRepositoryState() == null : this.getRepositoryState().equals(other.getRepositoryState()))
            && (this.getRepositoryAddress() == null ? other.getRepositoryAddress() == null : this.getRepositoryAddress().equals(other.getRepositoryAddress()))
            && (this.getRepositoryStartDate() == null ? other.getRepositoryStartDate() == null : this.getRepositoryStartDate().equals(other.getRepositoryStartDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRepositoryId() == null) ? 0 : getRepositoryId().hashCode());
        result = prime * result + ((getRepositoryName() == null) ? 0 : getRepositoryName().hashCode());
        result = prime * result + ((getRepositoryCode() == null) ? 0 : getRepositoryCode().hashCode());
        result = prime * result + ((getRepositoryPhone() == null) ? 0 : getRepositoryPhone().hashCode());
        result = prime * result + ((getRepositoryState() == null) ? 0 : getRepositoryState().hashCode());
        result = prime * result + ((getRepositoryAddress() == null) ? 0 : getRepositoryAddress().hashCode());
        result = prime * result + ((getRepositoryStartDate() == null) ? 0 : getRepositoryStartDate().hashCode());
        return result;
    }

}